#!/usr/bin/env python3
import sys
import time
import jwt
import json
import os

FONT_PATH = "song.ttf"
with open("./ignore/config.json") as f:
    config = json.load(f)

def gen_jwt():
    private_key = config["jwt_private_key"]

    payload = {
        'iat': int(time.time()) - 30,
        'exp': int(time.time()) + 900,
        'sub': config["sub"]
    }
    headers = {
        'kid': config["kid"]
    }

    # Generate JWT
    encoded_jwt = jwt.encode(payload, private_key, algorithm='EdDSA', headers = headers)

    return encoded_jwt

# print(gen_jwt())